<?php

/**
 * LongTermProgramApplication form.
 *
 * @package    sf_sandbox
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class LongTermProgramApplicationForm extends BaseLongTermProgramApplicationForm {

    public function configure() {
        $this->widgetSchema['qualification'] = new sfWidgetFormChoice(array('expanded' => true, 'choices' => array('educational' => ('educational'), 'non_educational' => ('non_educational'))));
        $this->widgetSchema['tafarog'] = new sfWidgetFormChoice(array('expanded' => true, 'choices' => array('full_time' => ('full_time'), 'part_time' => ('part_time'))));
        $this->widgetSchema['commissioning_source'] = new sfWidgetFormChoice(array('expanded' => true, 'choices' => array('ministry' => ('ministry'), 'administration' => ('administration'))));
        $this->widgetSchema['had_penalty_last_3_years'] = new sfWidgetFormChoice(array('expanded' => true, 'choices' => array('yes' => ('yes'), 'no' => ('no'))));
        $this->widgetSchema['responsible_of_a_current_issue'] = new sfWidgetFormChoice(array('expanded' => true, 'choices' => array('yes' => ('yes'), 'no' => ('no'))));
        $this->widgetSchema->setLabels(array(
            'job_id' => 'current job'
        ));
        $this->widgetSchema['qualifications_list']->setOption('expanded', true);
        unset($this['is_approved']);
        $this->widgetSchema['ministry_start_date'] = new sfHijreeDateWidget();
        $this->widgetSchema['birth_date'] = new sfHijreeDateWidget();
        $this->widgetSchema['current_job_start_date'] = new sfHijreeDateWidget();
        $this->widgetSchema['mobile']->setAttribute('style', 'width:256px');
        $this->validatorSchema['long_program_id'] = new sfValidatorInteger();
        $this->validatorSchema['major']->setOption('required', true);
        $this->validatorSchema['mobile']->setOption('required', true);
        $this->validatorSchema['qualifications_list']->setOption('required', true);
        $this->validatorSchema['qualification']->setOption('required', true);
        $this->validatorSchema['birth_date']->setOption('required', true);
        $this->validatorSchema['ministry_start_date']->setOption('required', true);
        $this->validatorSchema['job_id']->setOption('required', true);
        $this->validatorSchema['current_job_start_date']->setOption('required', true);
        $this->validatorSchema['tafarog']->setOption('required', true);
        $this->validatorSchema['commissioning_source']->setOption('required', true);
        $this->validatorSchema['had_penalty_last_3_years']->setOption('required', true);
        $this->validatorSchema['responsible_of_a_current_issue']->setOption('required', true);
        $this->validatorSchema['job_performance_year_1']->setOption('required', true);
        $this->validatorSchema['job_performance_degree_1']->setOption('required', true);
        $this->validatorSchema['job_performance_mark_1']->setOption('required', true);
        $this->widgetSchema['qualifications_list']->setOption('multiple', false);
        $this->widgetSchema['qualifications_list']->setOption('expanded', false);
        $this->validatorSchema['teacher_id'] = new sfValidatorInteger(array('required'=>false));
    }

}
